home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
C
/
LIB
/
UNIXLIB37B
/
!UnixLib37
/
src
/
stdio
/
c
/
getw
< prev
next >
Wrap
Text File
|
1996-11-09
|
865b
|
42 lines
/****************************************************************************
*
* $Source: /unixb/home/unixlib/source/unixlib37/src/stdio/c/RCS/getw,v $
* $Date: 1996/04/19 21:32:42 $
* $Revision: 1.1 $
* $State: Rel $
* $Author: simon $
*
* $Log: getw,v $
* Revision 1.1 1996/04/19 21:32:42 simon
* Initial revision
*
***************************************************************************/
static const char rcs_id[] = "$Id: getw,v 1.1 1996/04/19 21:32:42 simon Rel $";
#include <stdio.h>
#define INTSIZE 4
__STDIOLIB__
int
getw (register FILE * f)
{
register int i;
i = getc (f);
i |= (getc (f) << 8);
#if INTSIZE > 2
i |= (getc (f) << 16);
i |= (getc (f) << 24);
#if INTSIZE > 4
i |= (getc (f) << 32);
i |= (getc (f) << 40);
i |= (getc (f) << 48);
i |= (getc (f) << 56);
#endif
#endif
return (ferror (f) ? -1 : i);
}